package creators;

import java.util.Scanner;

import simulation.Model;
import util.Vector;

/**
 * creator for a GravityForce object.
 * @author Schwartz & Roy
 *
 */
public class GravityCreator extends Creator {

    /**
     * creates the object.
     * @param model is the model
     * @param line is the input
     */
    @Override
    public void create(Model model, Scanner line) {
        double direction = line.nextDouble();
        double magnitude = line.nextDouble();
        Vector g = new Vector(direction, magnitude);
        model.getEnvironment().setGravity(g);
    }
}
